package com.study.common.constant;

/**
 * 缓存的key 常量
 *
 * @author study
 */
public interface CacheConstants {

    /**
     * 登录用户 redis key
     */
    String LOGIN_TOKEN_KEY = "Authorization:login:token:";

    /**
     * 在线用户 redis key
     */
    String ONLINE_TOKEN_KEY = "online_tokens:";

    /**
     * APP 在线用户 redis key
     */
    String APP_ONLINE_TOKEN_KEY = "app_online_tokens:";

    /**
     * 验证码 redis key
     */
    String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 参数管理 cache key
     */
    String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    String SYS_DICT_KEY = "sys_dict:";

    /**
     * 防重提交 redis key
     */
    String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 限流 redis key
     */
    String RATE_LIMIT_KEY = "rate_limit:";

    /**
     * 登录账户密码错误次数 redis key
     */
    String PWD_ERR_CNT_KEY = "pwd_err_cnt:";

    /**
     * App 登录账户密码错误次数 redis key
     */
    String APP_PWD_ERR_CNT_KEY = "app_pwd_err_cnt:";

    /**
     * App短信验证码 - 登录
     */
    String APP_SMS_LOGIN_CODE = "app_sms_code:login:";

    /**
     * App短信验证码 - 注册
     */
    String APP_SMS_REGISTER_CODE = "app_sms_code:register:";

    /**
     * App邮箱验证码 - 注册
     */
    String APP_EMAIL_REGISTER_CODE = "app_email_code:register:";


    /**
     * App短信验证码 - 忘记密码
     */
    String APP_SMS_FORGET_CODE = "app_sms_code:forget:";

    /**
     * App邮箱验证码 - 忘记密码
     */
    String APP_EMAIL_FORGET_CODE = "app_email_code:forget:";

    /**
     * App短信验证码 - 绑定手机号
     */
    String APP_SMS_BIND_CODE = "app_sms_code:bind:";

    /**
     * App短信验证码 - 更换手机号
     */
    String APP_SMS_EXCHANGE_CODE = "app_sms_code:exchange:";

    /**
     * App邮箱验证码 - 更换邮箱 - 当前邮箱
     */
    String APP_EMAIL_EXCHANGE_CURRENT_CODE = "app_email_code:exchange:current:";

    /**
     * App邮箱验证码 - 更换邮箱 - 新邮箱
     */
    String APP_EMAIL_EXCHANGE_NEW_CODE = "app_email_code:exchange:new:";

    /**
     * App短信验证码 - 账号注销
     */
    String APP_SMS_DELETE_CODE = "app_sms_code:delete:";

    /**
     * App短信验证码 - 邮箱注销
     */
    String APP_EMAIL_DELETE_CODE = "app_email_code:delete:";

    /**
     * App短信验证码 - 用户绑定新手机号码
     */
    String APP_SMS_REBIND_CODE = "app_sms_code:rebind";
    /**
     * App短信验证码 - 发送sos短信
     */
    String APP_SOS_CNT_CODE = "app_sos_code:count:";

}
